package com.example.chcrm.entity.vehicle;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

/**
 * @Author 邹
 * @Date 2025/4/24 0:48
 * @Version 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TransportChildCv implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.INPUT)
    private String id;
    private String basicId;     //关联id(计划id)
    private String basicName;   //计划名称

    private String consignorId;     //委托商id
    @Excel(name = "委托商名称",width = 30)
    private String consignorName;   //委托商名称

    @Excel(name = "批次号",width = 40)
    private String batchNumber; //批次号
    @Excel(name = "运单号",width = 40)
    private String waybillNo;   //运单编号
    @Excel(name = "车架号",width = 40)
    private String frameNumber; //车架号
    private String brandId;     //品牌id
    @Excel(name = "品牌",width = 20)
    private String brandName;   //品牌名称
    private String modelId;     //型号id
    @Excel(name = "型号",width = 20)
    private String modelName;   //型号名称
    private String config;      //配置
    private String color;       //颜色
    private Double weight;      //重量
    private String lwh;         //长宽高

    private Integer departurePlaceType; //起运地类型：1区域，2港口
    private String departurePlaceId;    //起运地区域id
    private String departurePlaceFullId;    //起运地区域id(父级)
    @Excel(name = "起运地",width = 40)
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String departurePlace;      //起运地区域名

    @TableField(updateStrategy=FieldStrategy.IGNORED)
    private String departurePortId;     //起运港id
    @Excel(name = "起运港",width = 20)
    @TableField(updateStrategy=FieldStrategy.IGNORED)
    private String departurePort;       //起运港名
    private String departurePortAreaId; //起运港区域id
    private String departurePortArea;   //起运港区域名

    @TableField(updateStrategy=FieldStrategy.IGNORED)
    private String arrivePortId;        //到达港id
    @Excel(name = "目的港",width = 20)
    @TableField(updateStrategy=FieldStrategy.IGNORED)
    private String arrivePort;          //到达港名
    private String arrivePortAreaId;    //到达港区域id
    private String arrivePortArea;      //到达港区域名

    private Integer arrivePlaceType;    //到达地类型：1区域，2港口
    private String arrivePlaceId;       //到达地区域id
    private String arrivePlaceFullId;   //到达地区域id(父级)
    @Excel(name = "目的地",width = 40)
    private String arrivePlace;         //到达地区域名

    private String pickCar;             //提车场点
    @Excel(name = "收车单位",width = 40)
    private String collectCar;          //收车单位

    @TableField(updateStrategy=FieldStrategy.IGNORED)
    private String line1Id;      //线路1Id 起运地-起运港   代码实际上水陆联运 且有首端才有有line1
    private String line1IdY;      //线路1Id 起运地-起运港   代码实际上水陆联运 且有首端才有有line1
    @TableField(updateStrategy=FieldStrategy.IGNORED)
    private String line2Id;      //线路2Id 起运港-到达港 水路   水陆联运 或者纯水路才会有line2
    private String line2IdY;      //线路2Id 起运港-到达港 水路   水陆联运 或者纯水路才会有line2
    @TableField(updateStrategy=FieldStrategy.IGNORED)
    private String line3Id;      //线路3Id 到达港-到达地 公路   (错误的 实际代码 如果是纯公路 不管首端 末端 都是存的line3 )
    private String line3IdY;      //线路3Id 到达港-到达地 公路   (错误的 实际代码 如果是纯公路 不管首端 末端 都是存的line3 )

    private String actualPositionId;            //当前所在区域id
    private String actualPositionFullId;        //当前所在区域id，包含父级id
    private String actualPositionName;          //当前所在区域名称
    private String actualPositionCoordinate;    //当前所在坐标
    @TableField(updateStrategy=FieldStrategy.IGNORED)
    private String actualPortId;        //当前位置港口id
    @TableField(updateStrategy=FieldStrategy.IGNORED)
    private String actualPortName;      //当前位置港口名称

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date planDate;          //计划时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyy-MM-dd")
    private Date loadingDate;       //运输开始时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyy-MM-dd")
    private Date deliveryDate;      //运输交车时间

    private Integer isOutStorage;   //是否出库 0：未出库 1：已出库
    private Integer state;          //状态 0：待分配运输 1：已分配运输 2：运输中 3：已交车
    private Integer isNewEnergy;//是否新能源0否1是
    //逻辑删除-1是删除0是正常
    @TableLogic(value = "0", delval = "-1")
    private Integer isDeleted;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;   //创建时间
    @TableField(exist = false)
    private String ids;//用于接收的多id
    @TableField(exist = false)
    private Integer page = 1;
    @TableField(exist = false)
    private Integer rows = 10;
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;     //计划开始时间
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;       //计划结束时间
    //导出时接收日期
    @TableField(exist = false)
    private String startDateExport;     //计划开始时间
    @TableField(exist = false)
    private String endDateExport;       //计划结束时间
    @TableField(exist = false)
    private Integer transportMode;  //运输方式  1：公路 2：水路 3：水陆联运
    @TableField(exist = false)
    @Excel(name = "运输方式",width = 20)
    private String transportModeExport;  //运输方式  1：公路 2：水路 3：水陆联运
    @TableField(exist = false)
    private List<ActualTransportation> objectDate;  //运段详情相关信息
    @TableField(exist = false)
    @Excel(name = "计划时间",width = 40)
    private String planDateExport;
    @TableField(exist = false)
    @Excel(name = "状态",width = 20)
    private String stateExport;
    @TableField(exist = false)
    private List<String> carIdList;//记录修改目的地id
    @TableField(exist = false)
    private String carId;//记录修改目的地id
    @TableField(exist = false)
    private Integer operationType;//操作类型Type
    @TableField(exist = false)
    private String operationId;//操作类型Type

    @TableField(exist = false)
    private Integer isPlan;
    @TableField(exist = false)
    private Integer isSend;
    @TableField(exist = false)
    private Integer omId;
    @TableField(exist = false)
    private String interId; //接口id
    @TableField(exist = false)
    private Integer number;//运段数量
    @TableField(exist = false)
    private List<ActualTransportation> actualTransportationList;//实际运输线路运段信息
    @TableField(exist = false)
    private String startName;
    @TableField(exist = false)
    private String endName;
    @TableField(exist = false)
    private String transRulesType;
    @TableField(exist = false)
    private String supplierName;
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startPlanDate;     //用于查询得计划时间开始
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endPlanDate;     //用于查询得计划时间结束
    @TableField(exist = false)
    private List<String> frameNumbers;//用于查询的多车架号
    @TableField(exist = false)
    private String voyageNumber;//用于查询的航次
    @TableField(exist = false)
    private String shipName;//用于查询的船名
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startLoadingDate;//用于查询的装车时间区间
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date  endLoadingDate;//用于查询的装车时间区间
    
    @TableField(exist = false)
    private Integer isImport;//是否导入
    private Integer partYearMonth = Integer.parseInt(new SimpleDateFormat("yyyyMM").format(new Date()));//分区年月

    @TableField(exist = false)
    private String standingBookMonth;//台账月
    @TableField(exist = false)
    String planId ;
    @TableField(exist = false)
    String planNumber;
    @TableField(exist = false)
    int partYear;
}
